The present invention relates to data storage devices and particularly, although not exclusively to a method and apparatus for managing data block sizes in a data storage device.
Historically, conventional personal computers (PC) have not been able to boot their operating systems from a tape data storage back up device. Conventionally, PCs are booted from either an operating system stored on a hard disk drive, a floppy disk drive, or a CD ROM drive.
Conventionally, Unix based operating systems, have been able to boot their operating system from a tape based data storage device.
In WO 00/08561, published Feb. 17, 2000, there is disclosed a tape data storage device configured to operate as a bootable device for a Personal Computer (PC), where the tape data storage device emulates a CD-ROM drive.
In a first mode of operation, the tape data storage device operates for file system data back up.
In a second mode of operation, the tape data storage device emulates a CD-ROM drive and can be used in configuration with application software to cause a host computer running the software to generate a bootable image containing operating system, including the PC""s hardware configuration, and data recovery application software suitable for rebuilding the PC in the event of a disaster. The image is stored on tape in front of an actual file system back up data set. In the second mode of operation, the tape drive can be used to boot the PC and restore the operating system and application software of the PC.
The significance of the methods and apparatus disclosed in WO 00/08561, is that it enables a PC with a tape device, which presents an image of a CD ROM drive media to the host computer, which enables all of the items necessary for a full system recovery, including operating system recovery, into one image on a tape data storage back up device within a PC environment.
Because the tape data storage device is emulating a CD-ROM drive, the storage capacity is accessed in 2 kbyte block sizes, according to the ISO9660 CD-ROM standard as extended by the El Torito bootable CD-ROM format specification, version 1.0, Jan. 25, 1995. The prior art assumes that 2 kbyte records have to be written to a tape storage device, where the tape data storage device is presenting an image of a CD-ROM drive to a host computer.
Conventional tape data storage devices are configured to be written to in one of two modes: fixed block sized mode, or variable block size mode. In a fixed block size mode configuration, a fixed block size is set as part of an initialization process of a host computer communicating with a tape data storage device. Every block of data written to a tape media thereafter is set at that fixed block size. In the conventional variable block size mode, each write operation from a host computer has a block size of the actual data payload, which can be any size, and is not necessarily a multiple of a fixed block size.
Some prior art tape devices are intolerant of block size differences and will not stream (that is they will continuously reposition the media backwards and forwards as opposed to just forwards in tape direction) unless they receive a certain minimum block size per write command from the host computer. However, this precludes the use of some application programs which have to have set block sizes. For example, CD-ROM images need to be accessible in 2 kbyte chunks in order for a host computer to access them.
Therefore, there is a problem that in making a recovery data set for storage on a tape data storage device, in CD-ROM format, the host personal computer assumes a 2 kbyte data format, whereas this is an inefficient block size for operating a conventional tape data storage device, and this problem is not addressed in prior art systems.
One overall objective of the specific implementations of the present invention is to ameliorate the problem of a tape data storage device presenting a fixed format piece of data storage media in a predetermined block size format, which is incompatible with optimum performance of the tape data storage device.
In a specific implementation of the present invention, upon receiving a write command from a host computer, a payload block of data is compared to an ideal block size of data for a class of data storage device to which the payload is to be stored. An ideal data block size value is pre-stored in a tape device firmware, so that a received payload data block, subject of a write command, can be compared to the ideal data block size value. If the payload data block to be written is of a different size to the ideal data block size value, then the payload data block is written to a data storage media in a more optimal block size for that data storage media. The payload data block is padded for capacity if necessary in order to maintain the optimum data block size for the data storage media. Padding is achieved by using a marker data, which may be unique to a vendor media type, to indicate a boundary of an actual payload of data within the optimum block size.
Upon receiving a read command from a host computer, a nearest optimal amount of block sized data is read back from the tape data storage media.
Specific implementations according to the present invention allow the invention to be implemented either as firmware resident in a PC architecture or in a tape data storage architecture, or as an item of application software in the host computer.
Whilst the invention can be implemented either in firmware or in software, implementing the invention in software has the advantage that a conventional tape data storage device can be used without any modification.
According to a first aspect of the present invention there is provided a method of converting a data set from a first data block format acceptable to a host computer, to a second data block format acceptable by a tape data storage device, said method comprising the steps of:
receiving a payload of data comprising data blocks sized according to said first format;
comparing said data blocks of said payload in said first data format with a preferred data block size of said second format;
determining a number of data blocks of said second format into which said payload data can be contained; and
converting said payload data in said first format into a said determined number of data blocks of second format.
According to a second aspect of the present invention there is provided a method of converting a data set from a second data block format, optimised for storage in a tape data storage device, to a first data block format acceptable to a host computer device, said method comprising the steps of:
reading an integral number of blocks of said second data block format from a tape media;
storing said plurality of second format size data blocks in a buffer;
converting data contained within said plurality of second format data blocks into a plurality of first format data blocks; and
sending said plurality of first format data blocks to said host computer.
According to a third aspect of the present invention there is provided an apparatus for converting a data set from a first data block format acceptable to host computer, to a second data block format acceptable by a tape drive mechanism, said apparatus comprising:
a buffer for storing data blocks of a second data block format;
an algorithm for comparing said data blocks of said payload in said first data format with said preferred data block size of said second format;
an algorithm for determining a number of data blocks of said second format into which said payload data can be contained; and
an algorithm for converting said payload data in said first format into a said determined number of data blocks of said second format within said buffer.
The invention includes an apparatus for converting a data set from a second data block format, optimised for storage in a tape data storage device, to a first data block format acceptable to a host computer device, said method comprising the steps of:
reading an integral number of blocks of said second data block format from a tape media;
storing said plurality of second format size data blocks in a buffer;
converting data contained within said plurality of second format data blocks into a plurality of first format data blocks; and
sending said plurality of first format data blocks to said host computer.